<template>
  <div>
    <h1>{{ str }}</h1>
    <button @click="reverse">翻转</button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      str: '神奇的东西',
    }
  },
  methods: {
    reverse() {
      this.str = this.str.split('').reverse().join('')
    },
  },
}
</script>